package com.toplabs.unashu.mapper;

import com.toplabs.unashu.dto.*;
import com.toplabs.unashu.entity.Blog;
import com.toplabs.unashu.entity.BlogTypes;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author ityanger
 * @since 2020-08-23
 */
@Repository
public interface BlogMapper {
    List<BlogQuery> listBlog(SearchBlog searchBlog);

    int countBlog(SearchBlog searchBlog);

    int updateRecCom(RecCom recCom);

    int saveBlog(Blog blog);

    void addBlogTags(BlogTypes blogTypes);

    Blog getDraft(Long id);

    void deleteBlogType(Long id);

    int deleteBlog(Long id);

    List<PageBlog> getPageBlog(BlogPageable blogPageable);

    int getPageBlogTotal(BlogPageable blogPageable);

    List<RecommendHotBlog> getHotBlog();

    List<RecommendHotBlog> getRecommendBlog();

    DetailedBlog getDetailedBlog(Long id);

    List<String> getGroupYearMonth();

    List<ArchivesBlog> getArticleByMonth(String monthDate);

    void updateViews(Long id);
}
